import request from '@/config/axios'

export interface LocationVO {
  id: number
  name: string
}

// 查询号码池列表
export const getLocationPage = async (params) => {
  return await request.get({ url: `/call/location/page`, params })
}

// 查询号码池详情
export const getLocation = async (id: number) => {
  return await request.get({ url: `/call/location/get?id=` + id })
}

// 查询号码池列表
export const getLocationList = async () => {
  return await request.get({ url: `/call/location/list` })
}

// 新增号码池
export const createLocation = async (data: LocationVO) => {
  return await request.post({ url: `/call/location/create`, data })
}

// 修改号码池
export const updateLocation = async (data: LocationVO) => {
  return await request.put({ url: `/call/location/update`, data })
}

// 删除号码池
export const deleteLocation = async (id: number) => {
  return await request.delete({ url: `/call/location/delete?id=` + id })
}
